import { IFeidaoAiNodejsComponent } from '@feidao/web/interfaces';

import render from '@feidao/web/atom/nodejs/render/render';
import nodejs from '@feidao/web/atom/nodejs/msg-b/nodejs';

import server_render from '../atom-n/server-render';
import { Params } from '../atom/params2query';
import p2q from '../atom/params2query';
import generate_query4render from '../atom/generate-query4render';
import generate_sort_fields from '../atom/generate-sort-fields';

import P01 from './P01';

export default async function nba001(fd: IFeidaoAiNodejsComponent, ...args: any[]) {
	const res = await nodejs(fd.data.spaceid, "teach_staff_find", {
		criteria: { staff_number: fd.data.params.staff_number },
		page_no: 1,
		page_size: 1
	});
	render(fd.data.node, res.dataArray[0], P01, 'P01');
}